package cn.fj.hrm.controller;

import cn.fj.hrm.basic.util.JsonResult;
import cn.fj.hrm.dto.TenantDto;
import cn.fj.hrm.service.ITenantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("/1r")
public class LoginAndRegisterController {
    @Autowired
    private ITenantService tenantService;

    /**
     * 这是机构入驻（后台管理的注册）
     * @param tenantDto
     * @return
     */
    @PutMapping("/settledIn")
    public JsonResult  settledIn(@RequestBody @Valid TenantDto tenantDto){

            tenantService.settledIn(tenantDto);
            return  JsonResult.me();


    }
}
